<?php
App::uses( 'MemberAppModel', 'Model');

class ProductImage extends AppModel {
    var $name = 'ProductImage';


	/**
	 * Get
	 *
	 * @param type  meta
	 * @return type  meta
	 * @access public
	 */
	function getAllByPid($id = null)
	{
		if(empty($id)) return array();

		return $this->find('all', array('conditions' => array(
			'product_id' => $id
		)));
	}

	/**
	 * Get info by id
	 *
	 * @param type  meta
	 * @return type  meta
	 * @access public
	 */
	function getInfoById($id = null)
	{
		if(empty($id)) return array();

		return  $this->find('first', array('conditions' => array( 'id' => $id )));
	}
}
